package com.hrzyit.whistle.cases.service.impl

import com.hrzyit.base.ext.convert
import com.hrzyit.whistle.cases.data.bean.UploadInfo
import com.hrzyit.whistle.cases.data.repository.UploadRepository
import com.hrzyit.whistle.cases.service.IUploadService
//import rx.Observable
import io.reactivex.Observable
import javax.inject.Inject

/**
 * 上传文件模块业务接口实现类
 * @author YangWei
 * @date 2019/3/31
 */
class UploadServiceImpl @Inject constructor() : IUploadService {

    @Inject
    lateinit var uploadRepository: UploadRepository

    override fun uploadPhoto(photo: String): Observable<UploadInfo> {

        return uploadRepository.uploadPhoto(photo).convert()
    }

    override fun uploadRecordAudio(audioFilePath: String): Observable<UploadInfo> {
        return uploadRepository.uploadRecordAudio(audioFilePath).convert()
    }
}